Closed Bug 1505553 Opened 7 years ago Closed 7 years ago

some xpcshell tests broken by record

Categories

(WebExtensions :: General, defect, P1)

defect

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

References

Details

Attachments

(1 file)

./mach xpcshell-test toolkit/components/extensions/test/xpcshell/test_ext_contentscript_context.js Produces a lot of: JavaScript error: resource://testing-common/ContentTask.jsm, line 116: TypeError: ContentTask._testScope.record is not a function
Thanks for filing! It looks like for ContentTask running in xpc-shell tests, the "testScope" available is the Assert class from Assert.jsm and is not coming from browser-test.js Inaccurate comment in ContentTask.jsm: https://searchfox.org/mozilla-central/rev/6e0e603f4852b8e571e5b8ae133e772b18b6016e/testing/mochitest/BrowserTestUtils/ContentTask.jsm#38-39 Copy Assert.jsm methods in xpcshell test scope: https://searchfox.org/mozilla-central/rev/6e0e603f4852b8e571e5b8ae133e772b18b6016e/testing/xpcshell/head.js#513 The interesting thing is that todo and todo_is are also not available in this scope, so the following lines will fail in xpcshell tests: https://searchfox.org/mozilla-central/rev/6e0e603f4852b8e571e5b8ae133e772b18b6016e/testing/mochitest/BrowserTestUtils/ContentTask.jsm#119-123
Julian, do you want to take this?
Flags: needinfo?(jdescottes)
I wrote my comment before seeing your patch (thanks for working on it), but I'm fine with landing this to fix the issue. I think we should have a follow-up to clarify what can be "testScope" in ContentTask.jsm, but that can wait. So if Mark is ok with your patch we should land it.
Flags: needinfo?(jdescottes)
Assignee: nobody → mixedpuppy
Priority: -- → P1
See Also: → 1506134
I've posted a followup, bug 1506134.
Pushed by mixedpuppy@gmail.com: https://hg.mozilla.org/integration/autoland/rev/00c7004a24da add record to xpcshell tests for use in extension tests, r=Standard8
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: